package xxljob.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * xxl-job-admin 的认证参数，创建定时任务的固定参数等
 *
 * @author wuliting
 * @date 2022/3/27
 **/
@ConfigurationProperties("xxl-job-admin")
public class XxlJobAdminProperties {
    /**
     * url
     */
    private String url;
    /**
     * 执行器主键ID
     */
    private int jobGroup;
    /**
     * 任务的负责人
     */
    private String author;
    /**
     * 任务失败的报警邮件
     */
    private String alarmEmail;
    /**
     * 执行器，任务Handler名称
     */
    private String executorHandler;
    /**
     * 阻塞处理策略
     */
    private String executorBlockStrategy;
    /**
     * 任务执行超时时间，单位秒
     */
    private int executorTimeout;
    /**
     * 失败重试次数
     */
    private int executorFailRetryCount;
    /**
     * 新增任务后是否立即执行 (0 不执行 1 执行)
     */
    private int triggerStatus = 1;
    /**
     * 管理员账号
     */
    private String username;
    /**
     * 管理员密码
     */
    private String password;
    /**
     * 登录后的token
     */
    private String cookie;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getJobGroup() {
        return jobGroup;
    }

    public void setJobGroup(int jobGroup) {
        this.jobGroup = jobGroup;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getAlarmEmail() {
        return alarmEmail;
    }

    public void setAlarmEmail(String alarmEmail) {
        this.alarmEmail = alarmEmail;
    }

    public String getExecutorHandler() {
        return executorHandler;
    }

    public void setExecutorHandler(String executorHandler) {
        this.executorHandler = executorHandler;
    }

    public String getExecutorBlockStrategy() {
        return executorBlockStrategy;
    }

    public void setExecutorBlockStrategy(String executorBlockStrategy) {
        this.executorBlockStrategy = executorBlockStrategy;
    }

    public int getExecutorTimeout() {
        return executorTimeout;
    }

    public void setExecutorTimeout(int executorTimeout) {
        this.executorTimeout = executorTimeout;
    }

    public int getExecutorFailRetryCount() {
        return executorFailRetryCount;
    }

    public void setExecutorFailRetryCount(int executorFailRetryCount) {
        this.executorFailRetryCount = executorFailRetryCount;
    }

    public int getTriggerStatus() {
        return triggerStatus;
    }

    public void setTriggerStatus(int triggerStatus) {
        this.triggerStatus = triggerStatus;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCookie() {
        return cookie;
    }

    public void setCookie(String cookie) {
        this.cookie = cookie;
    }
}
